package com.primb.bench.common.utils;

import com.primb.baselibs.view.loading.SpotsDialog;
import com.primb.bench.base.IApplication;

/**
 * Created by Chen on 2017/7/10.
 * 功能描述：
 */

public class DialogUtils {
    private static SpotsDialog loadingDialog;

    public static void showLoadingDialog() {
        if (loadingDialog == null) {
            loadingDialog = new SpotsDialog(IApplication.getInstance(), "加载中");
        } else {
            loadingDialog.setMessage("加载中");
        }
        loadingDialog.show();
    }

    public static void hideLoadingDialog() {
        if (loadingDialog != null && loadingDialog.isShowing()) {
            loadingDialog.dismiss();
        }
    }
}
